// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef SUMMARIZER_SUMMARIZER_H_
#define SUMMARIZER_SUMMARIZER_H_

#include <vector>
#include <string>
#include "summarizer/topicsum.h"

namespace topicsum {

class SummarizerOptions;
class SummaryOptions;

class TopicSummarizer {
 public:
  TopicSummarizer() {}

  // Initializes the summarizer with given options.
  // Returns false if the summarizer could not be initialized.
  bool Init(const SummarizerOptions& options);

  // Summarize a collection of documents and stores the result in xml form in
  // summary.
  // Returns false if the collection could not be summarized.
  bool Summarize(const SummaryOptions& options,
                 string* summary);

  // Return the last error message generated by the summarizer
  // during initialization or summarization.
  const string& last_error_message() const { return last_error_message_; }

 protected:
  TopicSum summarizer;

  string last_error_message_;
};

}  // namespace topicsum

#endif  // SUMMARIZER_SUMMARIZER_H_
